#
#	MAKEFILE for uC/IP 1.0 Library
#
#	This makes the objects and links them into the library only.
#

# Choose the operating system.
IF_PATH = ../if_dev/ne2k
OS_PATH = ../OS_WIN32/
IP_PATH = ..


TARGETNAME = UCIP.lib

DEFS = -D_NDEBUG 
INCLUDE = -I$(OS_PATH)

#CFLAGS = -I$(OS_PATH)
CC = gcc
CPPFLAGS = -O0 -g3 -W $(DEFS) $(INCLUDE)



#################################################
# List the dependancies for the targets to make

OBJECTS = \
       $(IP_PATH)/InetAddr.o \
       $(IP_PATH)/net.o \
       $(IP_PATH)/netaddrs.o \
       $(IP_PATH)/netarp.o \
       $(IP_PATH)/netauth.o \
       $(IP_PATH)/netbootp.o \
       $(IP_PATH)/netbuf.o \
       $(IP_PATH)/netchap.o \
       $(IP_PATH)/netchat.o \
       $(IP_PATH)/netchpms.o \
       $(IP_PATH)/netdebug.o \
       $(IP_PATH)/netdhcp.o \
       $(IP_PATH)/neteth.o \
       $(IP_PATH)/netether.o \
       $(IP_PATH)/netfsm.o \
       $(IP_PATH)/neticmp.o \
       $(IP_PATH)/netip.o \
       $(IP_PATH)/netipcp.o \
       $(IP_PATH)/netlcp.o \
       $(IP_PATH)/netmagic.o \
       $(IP_PATH)/netmd5.o \
       $(IP_PATH)/netpap.o \
       $(IP_PATH)/netppp.o \
       $(IP_PATH)/netrand.o \
       $(IP_PATH)/netsock.o \
       $(IP_PATH)/netsocka.o \
       $(IP_PATH)/nettcp.o \
       $(IP_PATH)/nettimer.o \
       $(IP_PATH)/netudp.o \
       $(IP_PATH)/netvj.o

#       $(IP_PATH)/netvj.o \
#       $(IF_PATH)/if_ne2kd.c \
#       $(IF_PATH)/if_os.c \
#       $(OS_PATH)/ucos.c \
#       $(OS_PATH)/ucos32.c \
#       $(OS_PATH)/trace.c


DEPENDENCIES = Makefile



#################################################
# How to build the targets

$(TARGETNAME): $(OBJECTS) $(DEPENDENCIES)
	$(RM) $(TARGETNAME)
	$(LD) -r $(OBJECTS) -o $(TARGETNAME)


.PHONY : clean



#################################################
# Cleanup

clean:
	$(RM) $(OBJECTS)
	$(RM) $(TARGETNAME)
